<template>
    <div>
        <swiper>
            <swiper-item v-for="(item,key) in banners" :key="key">
                <a :href="item.link">
                    <img :src="item.image" alt="" @load="imgLoaded">
                </a>
            </swiper-item>
        </swiper>
    </div>
</template>

<script>
    // import {swiper,swiperItem} from 'components/common/swiper'
    import swiper from 'components/common/swiper/swiper.vue'
    import swiperItem from 'components/common/swiper/swiperItem.vue'

    export default {
        components: {
            swiper,
            swiperItem
        },
        props:{
            banners:Array
        },
        methods:{
            imgLoaded(){
                this.$emit('swiperImgLoaded')
            }
        }
    }
</script>

<style scoped>

</style>